{extend name="common/base"}

{block name="title"}Info Page{/block}

{block name="body"}
{include file="common/navbar"}
<div class="row">
    {include file="common/leftbar"}
    <div class="col-md-10">
        <ol class="breadcrumb">
            <li>个人中心</li>
        </ol>
        <form class="form-horizontal" action="{:url('update')}" enctype="multipart/form-data" method="post">
            <div class="form-group">
                <label class="col-sm-2 control-label" for="username">用户名</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="username" name="username" placeholder="用户名" value="{:session('user.username')}" disabled>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="current">当前密码</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" id="current" name="current" placeholder="当前密码">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="new">新密码</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" id="new" name="new" placeholder="新密码">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="again">确认密码</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" id="again" name="again" placeholder="确认密码">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="nickname">昵称</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="nickname" name="nickname" placeholder="昵称" value="{:session('user.nickname')}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="email">邮箱</label>
                <div class="col-sm-8">
                    <input type="email" class="form-control" id="email" name="email" placeholder="邮箱" value="{:session('user.email')}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="avatar">头像</label>
                <div class="col-sm-8">
                    <input type="file" id="avatar" name="avatar">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="submit" class="btn btn-primary" value="确认修改">
                </div>
            </div>
        </form>
    </div>
</div>
{/block}

{block name="script"}
<script>
    $('#info').addClass('active')
</script>
{/block}
